<%@ page import="com.chg.mymvc.entity.News" %>
<%@ page import="com.chg.mymvc.entity.Item" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2020/7/14
  Time: 19:36
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <%@ page contentType="text/html;charset=UTF-8" language="java" %>
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <link href="text/javascript" src="bootstrap-3.3.7-dist/css/bootstrap.css" rel="stylesheet"></link>
</head>
<body>
<div class="add_Account dn">
    <form action="updatenews" method="post" id="user_detail_form">

        <div class="add_Account_c">
            <div class="add_Account_h">
                <div class="add_Account_h_in">
                    <%News news= (News) request.getAttribute("news");%>
                    <a href="nmanage.html"> <h2>&lt;返回上一页</h2></a>
                    <div  text-align:center;>   <h1 text-align:center;>    标题:<input name="titlename" value="<%=news.getTitle()%>"/></h1></div>
                        <div class="AM_ct text_center">
                            <div class="AM_ct_in">
                                <div class="form-group">

                                    <div class="column_name">
                                        <label class="text_center">栏目</label>
                                        <select class="column_name_release" name="selectedoption" >
<%--                                            <%--%>

    <%--
System.out.println("list"+list);--%>
<%--                                                if(list.size()<1){--%>
<%--                                            %>--%>
<%--                                            <option value="教务处">教务处</option>--%>
<%--                                            <%} else{--%>
<%--                                                for(Item item:list){--%>
<%--                                                    if( <%=item.getId()%> == <%=news.getId()%>)--%>
<%--                                            %>--%>
<%--                                            <option value="<%=item.getPerm()%>">  <%=item.getPerm()%>  </option>--%>

<%--                                            <%}--%>
<%--                                            }%>--%>

    <c:forEach items="${sessionScope.itemsofperm}" var="li">
        <c:choose>
            <c:when test="${li.id==news.itemid}">
            <option value="${li.id}" selected>${li.perm} </option>
            </c:when>
            <c:otherwise>
        <option value="${li.id}">${li.perm} </option>
        </c:otherwise>
        </c:choose>

    </c:forEach>


                                        </select>
                                    </div>


                                    <textarea class="form-control"   resize="none" style="overflow:scroll; overflow-x:hidden; "  placeholder="编辑正文" name="content" height="200px";  width="1000px"; rows="15"; cols="160";style="border:red solid;border-width:1px;color:#CCCCCC;text-align: center"><p> <%=news.getContent()%> </p></textarea>
<%--                                    rows="100" cols="130"--%>
                                </div>
                                <input type="submit" class="df_btn fl text_center edit_btn edit_Account_btn"  style="background:#007FB0e;color: black;width:70px;text-align:center;" ></input>
<%--                                <button type="submit" class="btn btn-success df_btn fl text_center">成功按钮</button>--%>
                            </div>

                        </div>


                </div>
    </form>
</body>
</html>
